#!/usr/bin/env pybricks-micropython
from MyRobot import MyRobot
import time
from pybricks.hubs import EV3Brick
 

ev3 = EV3Brick()

goStep=17
turnStep = 9.6
mybot = MyRobot(ev3,1,1)
openZhuazi = 2

 

if(openZhuazi ==1):
    mybot.zhuaZiOpen(mybot.EV3_zhuaZi_SPEED ,180*4+800)
    mybot.zhuaZiOpen(mybot.EV3_zhuaZi_SPEED ,180*8+90+5-800)
# mybot.zhuaGanUpToTop(mybot.EV3_zhuaGan_SPEED)


mybot.goTask3_Group1()

# mybot.goAhead(goStep*19)
# mybot.zhuaGanDownByDegree(mybot.EV3_zhuaGan_SPEED,180*15 + 160)
# mybot.turn(turnStep*3)
 
# mybot.goAhead(goStep *10 * -1)
# mybot.zhuaGanDownByDegree(mybot.EV3_zhuaGan_SPEED,180+180+180+90)
# mybot.zhuaZiClose(mybot.EV3_zhuaZi_SPEED ,180*12+90+90)
# mybot.zhuaGanUpToTop(mybot.EV3_zhuaGan_SPEED) 


# mybot.turn(turnStep*9 * -1 - turnStep*0.2)
# mybot.goAhead(goStep*8)                
# mybot.putThingDownAndUp()


# mybot.goAhead(goStep*8 * -1)
# mybot.turn((turnStep*9 * -1 - turnStep*0.2) * -1)
# mybot.goAhead(goStep *10 )
# mybot.turn((turnStep*3 + turnStep*0.2)*-1)



# mybot.turn((turnStep*3 + turnStep*0.2)*-1)
# mybot.zhuaGanDownByDegree(mybot.EV3_zhuaGan_SPEED,180*(15-4) + 160)
# mybot.goAhead(goStep *10 * -1)
# mybot.zhuaGanDownByDegree(mybot.EV3_zhuaGan_SPEED,180+180+180+90)
# mybot.zhuaZiClose(mybot.EV3_zhuaZi_SPEED ,180*12+90+90)
# mybot.paySound(['C4/8','D4/8','E4/8'])
# mybot.zhuaGanUpToTop(mybot.EV3_zhuaGan_SPEED)    
# mybot.goAhead(goStep *10 )
# mybot.turn((turnStep*3 + turnStep*0.2))
# mybot.robot.stop()